package com.scau.ums.controller;

import com.scau.ums.service.imp.mail.SendMailImp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * author: 莫伟杰
 * date： 2019/8/9 16:55
 */

//only for test
@Controller
@EnableAsync
public class SendMailController {

    private SendMailImp sendMailImp;

    @Autowired
    public void setSendMailImp(SendMailImp sendMailImp) {
        this.sendMailImp = sendMailImp;
    }

    @RequestMapping("/sendMail")
    public void sendMail()
    {
        for(int i=0;i<5;i++)
            sendMailImp.sendMail("871137747@qq.com","测试","12346");
    }
}
